<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page import="java.sql.*"%>
<%@ page import="cmcc.customer.*"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%
	request.setCharacterEncoding("utf-8");
	response.setCharacterEncoding("utf-8");
%>
<%
	String flag = request.getParameter("flag");
	System.out.println("flag = " + flag);
	if (flag != null && flag.equals("newcustomer2")) {
		String id_type = request.getParameter("id_type");
		String id_number = request.getParameter("id_number");
		String customer_name = request.getParameter("customer_name");
		String customer_sex = request.getParameter("customer_sex");
		String birthday_year = request.getParameter("birthday_year");
		String birthday_month = request.getParameter("birthday_month");
		String birthday_day = request.getParameter("birthday_day");
		String customer_address = request
				.getParameter("customer_address");

		System.out.println("zhengjian = " + id_type);
		System.out.println("zhengjian = " + id_number);
		System.out.println("zhengjian = " + customer_name);
		System.out.println("zhengjian = " + customer_sex);
		System.out.println("zhengjian = " + birthday_year);
		System.out.println("zhengjian = " + birthday_month);
		System.out.println("zhengjian = " + birthday_day);
		System.out.println("zhengjian = " + customer_address);

		if (Customer.addCustomer(id_type, id_number, customer_name,
				birthday_year, birthday_month, birthday_day,
				customer_sex, customer_address)) {
					%>
					<br>
					<br>
					<br>
					<h2 align="center">添加成功！</h2>
					<h3 align="center">
						<a href="<%=basePath%>kaihu/customer/customer_info.jsp?id_number=<%=id_number%>">添加账户</a>
						<a href="<%=basePath%>kaihu/customer/customer_info.jsp?id_number=<%=id_number%>">添加手机号</a>
					</h3>
					<%
		}

	}
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>My JSP 'checkNewCustomer.jsp' starting page</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

</head>

<body>
	This is my JSP page.
	<br>
</body>
</html>
